﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace HZY.Admin.Controllers
{
    using AppFilter;
    using HZY.Toolkit;

    [ApiExplorerSettings(GroupName = nameof(ApiVersionsEnum.Admin))]
    [Route("admin/[controller]")]
    [ApiController]
    public class ApiBaseController : ControllerBase
    {
        [NonAction]
        public ApiResult ApiResult() => new ApiResult() { Code = (int)ApiResultCodeEnum.成功 };
        [NonAction]
        public ApiResult ApiResult<T>(T result) => new ApiResult() { Code = (int)ApiResultCodeEnum.成功, Result = result };
        [NonAction]
        public ApiResult ApiResultError(string result) => new ApiResult() { Code = (int)ApiResultCodeEnum.错误, Result = result };
        [NonAction]
        public ApiResult ApiResultNoAuth(string result) => new ApiResult() { Code = (int)ApiResultCodeEnum.未授权, Result = result };







    }
}